package practice_3_2;
//求1！+2！+3！+4！+........+n!的和
public class FactorialSum {
    public static void main(String[] args) {
        int ret  = 1;
        int sum = 0;
        for(int n = 1; n <= 10; n++){
            ret *= n;   //ret为n的阶乘
            sum += ret;
        }
        System.out.println(sum);
    }
}

